﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Filters;


public class ActionFilter : IActionFilter
{
    public void OnActionExecuting(ActionExecutingContext context)
    {
        //ApiDescription.ActionAttributes();
        var actionAttrs = context.ActionDescriptor.EndpointMetadata;
        //var isAuthorized = actionAttrs.Any(a => a.GetType() == typeof(AuthAttribute));

        //context.HttpContext.Response.WriteAsync($"{GetType().Name} in. \r\n");
    }

    public void OnActionExecuted(ActionExecutedContext context)
    {
        context.HttpContext.Response.WriteAsync($"{GetType().Name} out. \r\n");
    }
}